package model;

import java.util.Comparator;

public abstract class Item extends GameObject implements Comparator <Item>{
	protected Tile location;
	protected boolean isImpassable;
	
	abstract boolean touch(Entity e);
	public boolean isImpassable()
	{
		return(isImpassable);
	}
	public int compare(Item i1, Item i2)
	{
		return(i1.getTypeId().compareTo(i2.getTypeId()));		
	}
	public boolean equals(Item i2)
	{
		return(this.getTypeId().equals(i2.getTypeId()));
	}
	public Tile getLocation() {
		return location;
	}
	public void setLocation(Tile location) {
		this.location = location;
	}
	public void setIsImpassable(boolean isImpassable) {
		this.isImpassable = isImpassable;
	}
}
